package com.zking.ssm.PMQ.service.imp;

import com.zking.ssm.PMQ.mapper.RoleMapper;
import com.zking.ssm.PMQ.model.Role;
import com.zking.ssm.PMQ.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements IRoleService {

    @Autowired
    private RoleMapper roleMapper;

    public RoleServiceImpl() {
    }

    public RoleMapper getRoleMapper() {
        return roleMapper;
    }

    public void setRoleMapper(RoleMapper roleMapper) {
        this.roleMapper = roleMapper;
    }

    @Override
    public List<Role> listRole(Role record) {
        return roleMapper.listRole(record);
    }

    @Override
    public Role listUserRole(Long usrId) {
        return roleMapper.listUserRole(usrId);
    }
}
